﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Bukstor.UI.Utilidades
{
    public partial class CatTitulosDisplay : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Response.Redirect("CatTitulo.aspx?titulo=" + gvTitulos.DataKeys[gvTitulos.SelectedIndex].Value, true);
        }

        public IEnumerable<CatTitulosRow> DataSource
        {
            get
            {
                return gvTitulos.DataSource as IEnumerable<CatTitulosRow>;
            }
            set
            {
                gvTitulos.DataSource = value;
                gvTitulos.DataBind();
            }
        }
    }
}